﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SmartSpace.Organization
{
    public interface IOrganizationService
    {
        #region node
        bool SaveNode(Node node);
        bool DeleteNode(Node node);
        Node GetNode(Guid id, bool isRecursive);
        Node GetNode(string code, bool isRecursive);
        List<Node> GetChildren(Guid id, bool isRecursive);
        List<Node> GetChildren(string code, bool isRecursive);
        #endregion

        #region organization type
        bool SaveType(NodeType type);
        bool DeleteType(NodeType type);
        bool DeleteType(string code);
        bool IncludeSubType(Guid parentTypeId, Guid subTypeId);
        bool RemoveSubType(Guid parentTypeId, Guid subTypeId);
        NodeType GetType(string code);
        List<NodeType> GetSubTypes(Guid typeId);
        #endregion

        #region employee
        ServiceResult SaveEmployee(Employee employee);
        ServiceResult DeleteEmployee(Guid id);
        ServiceResult DeleteEmployee(string code);
        SingleResult<Employee> GetEmployee(Guid id);
        SingleResult<Employee> GetEmployee(string code);
        #endregion
    }
}
